<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 导航栏 -->
<!--<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light flex-md-nowrap p-0" id="nav" th:fragment="topBar">-->
    <nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light " id="nav" th:fragment="topBar">
    <div class="collapse navbar-collapse col-md-10 offset-md-1 animate__animated  animate__zoomIn"
         id="navbarSupportedContent">
        <a id="logo-img" class="navbar-brand col-sm-3 col-md-2 mr-0" href="/index.html">
            <img alt="Brand" th:src="@{/airent/common/imgs/logo_small.png}">
        </a>
        <ul class="navbar-nav mr-auto">
            <li class="nav-item">
                <a id="select-city" class="nav-link" href="/selectcity.html">
                    <svg id="city-icon" class="bi bi-building" width="1em"
                         height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd"
                              d="M15.285.089A.5.5 0 0 1 15.5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V14h-1v1.5a.5.5 0 0 1-.5.5H1a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .418-.493l5.582-.93V3.5a.5.5 0 0 1 .324-.468l8-3a.5.5 0 0 1 .46.057zM7.5 3.846V8.5a.5.5 0 0 1-.418.493l-5.582.93V15h8v-1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 .5.5V15h2V1.222l-7 2.624z" />
                        <path fill-rule="evenodd" d="M6.5 15.5v-7h1v7h-1z" />
                        <path
                                d="M2.5 11h1v1h-1v-1zm2 0h1v1h-1v-1zm-2 2h1v1h-1v-1zm2 0h1v1h-1v-1zm6-10h1v1h-1V3zm2 0h1v1h-1V3zm-4 2h1v1h-1V5zm2 0h1v1h-1V5zm2 0h1v1h-1V5zm-2 2h1v1h-1V7zm2 0h1v1h-1V7zm-4 0h1v1h-1V7zm0 2h1v1h-1V9zm2 0h1v1h-1V9zm2 0h1v1h-1V9zm-4 2h1v1h-1v-1zm2 0h1v1h-1v-1zm2 0h1v1h-1v-1z" />
                    </svg>
                    <span id="cityname" >选择城市</span>
                </a>
            </li>
        </ul>
        <ul class="navbar-nav mr-5 ">
            <li class="nav-item">
                <a class="nav-link" href="/searchhouse.html">租房</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/issuehouse.html">发布房源</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/roommate">寻找室友</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="/bbs.html">租房圈</a>
            </li>
            <li class="nav-item" shiro:hasRole="admin">
                <a class="nav-link" th:href="@{/userManage}">我是管理员</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
                   aria-haspopup="true" aria-expanded="false">
                    指南
                </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="Agreement.html">用户协议</a>
                    <a class="dropdown-item" href="Potplayer.html">隐私政策</a>
                    <a class="dropdown-item" href="Commitment.html">服务承诺</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="about.html">关于我们</a>
                </div>
            </li>
        </ul>
        <a th:hidden="${session.user} != null" href="/login_register.html" id="login-button" class="btn btn-outline-success active animate__animated animate__pulse"
           role="button" aria-pressed="true">登录/注册</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a role="button" aria-pressed="true" class="btn btn-outline-success active animate__animated animate__pulse" th:href="@{/userDto/logout}">退出</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span th:hidden="${session.user} == null">欢迎您:<span shiro:principal="userName"></span></span>
        <!-- <a href="register.html" id="register-button"
          class="btn btn-outline-success active animate__animated animate__pulse" role="button" aria-pressed="true">注册</a> -->
    </div>
</nav>
</body>
</html>
